package com.ty.day3;

import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : txy
 * @Create 2023/10/30 10:11
 */
public class One {
    public static void main(String[] args) {
        long sum = 0, p, a, b;

        Scanner sc = new Scanner(System.in);
        System.out.print("请输入式子的个数：");
        a = sc.nextLong();
        System.out.print("请输入一个个位数：");
        p = sc.nextLong();
        sum = b = p;
        System.out.print(p);
        for (int i = 1; i < a; i++) {
            p = p * 10 + b;
            sum += p;
            System.out.print("+" + p);
        }
        System.out.println("=" + sum);

    }
}
